package com.fowo.api.sys.model;

import com.fowo.api.common.validator.Phone;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

@Data
public class CreateSysUser {
    /**
     * 用户名
     */
    @Schema(title = "用户名")
    @NotEmpty
    private String username;

    /**
     * 显示用户名
     */
    @Schema(title = "显示用户名")
    @Size(max = 20)
    private String name;

    /**
     * 头像
     */
    @Schema(title = "头像")
    @Size(max = 255)
    private String avatar;

    /**
     * 手机号
     */
    @Phone
    @Schema(title = "手机号")
    private String mobile;

    /**
     * 密码
     */
    @Schema(title = "密码")
    @NotEmpty
    @Size(min = 6, message = "密码长度不能少于 6 个字符")
    private String password;

    /**
     * 密码
     */
    @Schema(title = "确认密码")
    @NotEmpty
    @Size(min = 6, message = "密码长度不能少于 6 个字符")
    private String confirmPassword;

    @Schema(title = "是否禁用")
    private Boolean isDisabled;
}
